package com.fofia.iotweb.web.domain.models;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.noear.snack.annotation.ONodeAttr;

import java.io.Serializable;
import java.util.Date;


/**
 * 反刍标签
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(value = "fc_data")
public class FcData  implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.None)
    @Column(value = "data_id")
    @ONodeAttr(name = "data_id")
    private int dataId;

    @Column(value = "voltage")
    private int voltage;

    @Column(value = "ruminate")
    private int ruminate;

    @Column(value = "temperature")
    private float temperature;

    @Column(value = "speed_hex")
    @ONodeAttr(name= "speed_hex")
    private String speedHex;

    @Column(value = "upload_time")
    @ONodeAttr(name = "upload_time",format="yyyy-MM-dd HH:mm:ss.SSS")
    private Date uploadTime;

    @Column(value = "rssi")
    @ONodeAttr(name= "rssi")
    private int rssi;

    @Column(value = "gateway_mac")
    @ONodeAttr(name= "gateway_mac")
    private String gatewayMac;

    @Column(ignore=true)
    @ONodeAttr(name= "tag_id")
    private String tagId;
}